<%
  modules = singular_class_name.split("::")
  modules[0] = "Serializers::#{modules[0]}"
  ident = ""
%>
<% modules[0..-2].each do |m| %>
<%=  "#{ident}module #{m}\n" %>
<%   ident << "  " %>
<% end %>
<%=  ident %>class <%= modules.last %> < Serializers::Base
<%=  ident %>  structure(:default) do |arg|
<%=  ident %>    {
<%=  ident %>      created_at: arg.created_at.try(:iso8601),
<%=  ident %>      id:         arg.id,
<%=  ident %>      updated_at: arg.updated_at.try(:iso8601),
<%=  ident %>    }
<%=  ident %>  end
<%=  ident %>end
<% while ident.size > 0 do %>
<%   ident.chop!.chop! %>
<%=  "#{ident}end\n" %>
<% end %>
